/* © Jean-Pest 2011 */
/* Node "objects"   */

/*  Type Node  */
typedef struct node node;
struct node
{
	/* Member Variables */
    char *name; /* Node name     */
	int    x,y; /* Node position */
	
	/* Member Routines */
		/* Name handling */
	void  (*set_name) (node* , char*);
	char *(*get_name) (node*);
	
		/* Set Position */
	void (*setx) (node*, int);
	void (*sety) (node*, int);
	
		/* Get Position */
	int (*getx) (node*);
	int (*gety) (node*);
	
		/* Display */
	void (*print) (node*);
	
	/* Self destroy */
	void (*destroy) (node*);
};

/* Base functions, to be aliased in the fake object */

/* Creation */
node *n_new (void);

/* Initialisation */
static void n_init(node*);

/* Name handling */
void  n_nset(node*, char*);
char *n_nget(node*);

/* Position */
	/* set */
void n_setx(node*, int);
void n_sety(node*, int);
	/* get */
int  n_getx(node*);
int  n_gety(node*);

/* Display */
void n_print (node*);

/* Destroy */
void  n_destroy();